Optimal. Leaf size=51 \[ \frac {(A-B) (a+a \sin (c+d x))^4}{4 a d}+\frac {B (a+a \sin (c+d x))^5}{5 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {2912, 45}
\begin {gather*} \frac {B (a \sin (c+d x)+a)^5}{5 a^2 d}+\frac {(A-B) (a \sin (c+d x)+a)^4}{4 a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2912
Rubi steps
\begin {align*} \int \cos (c+d x) (a+a \sin (c+d x))^3 (A+B \sin (c+d x)) \, dx &=\frac {\text {Subst}\left (\int (a+x)^3 \left (A+\frac {B x}{a}\right ) \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\text {Subst}\left (\int \left ((A-B) (a+x)^3+\frac {B (a+x)^4}{a}\right ) \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {(A-B) (a+a \sin (c+d x))^4}{4 a d}+\frac {B (a+a \sin (c+d x))^5}{5 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 36, normalized size = 0.71 \begin {gather*} \frac {a^3 (1+\sin (c+d x))^4 (5 A-B+4 B \sin (c+d x))}{20 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(97\) vs.
\(2(47)=94\).
time = 0.20, size = 98, normalized size = 1.92
method | result | size |
derivativedivides | \(\frac {\frac {B \,a^{3} \left (\sin ^{5}\left (d x +c \right )\right )}{5}+\frac {\left (a^{3} A +3 B \,a^{3}\right ) \left (\sin ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (3 a^{3} A +3 B \,a^{3}\right ) \left (\sin ^{3}\left (d x +c \right )\right )}{3}+\frac {\left (3 a^{3} A +B \,a^{3}\right ) \left (\sin ^{2}\left (d x +c \right )\right )}{2}+a^{3} A \sin \left (d x +c \right )}{d}\) | \(98\) |
default | \(\frac {\frac {B \,a^{3} \left (\sin ^{5}\left (d x +c \right )\right )}{5}+\frac {\left (a^{3} A +3 B \,a^{3}\right ) \left (\sin ^{4}\left (d x +c \right )\right )}{4}+\frac {\left (3 a^{3} A +3 B \,a^{3}\right ) \left (\sin ^{3}\left (d x +c \right )\right )}{3}+\frac {\left (3 a^{3} A +B \,a^{3}\right ) \left (\sin ^{2}\left (d x +c \right )\right )}{2}+a^{3} A \sin \left (d x +c \right )}{d}\) | \(98\) |
risch | \(\frac {7 \sin \left (d x +c \right ) a^{3} A}{4 d}+\frac {7 a^{3} B \sin \left (d x +c \right )}{8 d}+\frac {\sin \left (5 d x +5 c \right ) B \,a^{3}}{80 d}+\frac {a^{3} \cos \left (4 d x +4 c \right ) A}{32 d}+\frac {3 a^{3} \cos \left (4 d x +4 c \right ) B}{32 d}-\frac {\sin \left (3 d x +3 c \right ) a^{3} A}{4 d}-\frac {5 \sin \left (3 d x +3 c \right ) B \,a^{3}}{16 d}-\frac {7 a^{3} \cos \left (2 d x +2 c \right ) A}{8 d}-\frac {5 a^{3} \cos \left (2 d x +2 c \right ) B}{8 d}\) | \(158\) |
norman | \(\frac {\frac {\left (6 a^{3} A +2 B \,a^{3}\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {\left (6 a^{3} A +2 B \,a^{3}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 \left (11 a^{3} A +9 B \,a^{3}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 \left (11 a^{3} A +9 B \,a^{3}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 a^{3} A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 a^{3} A \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {8 a^{3} \left (2 A +B \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {8 a^{3} \left (2 A +B \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {28 a^{3} \left (5 A +4 B \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}\) | \(244\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.32, size = 84, normalized size = 1.65 \begin {gather*} \frac {4 \, B a^{3} \sin \left (d x + c\right )^{5} + 5 \, {\left (A + 3 \, B\right )} a^{3} \sin \left (d x + c\right )^{4} + 20 \, {\left (A + B\right )} a^{3} \sin \left (d x + c\right )^{3} + 10 \, {\left (3 \, A + B\right )} a^{3} \sin \left (d x + c\right )^{2} + 20 \, A a^{3} \sin \left (d x + c\right )}{20 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 94, normalized size = 1.84 \begin {gather*} \frac {5 \, {\left (A + 3 \, B\right )} a^{3} \cos \left (d x + c\right )^{4} - 40 \, {\left (A + B\right )} a^{3} \cos \left (d x + c\right )^{2} + 4 \, {\left (B a^{3} \cos \left (d x + c\right )^{4} - {\left (5 \, A + 7 \, B\right )} a^{3} \cos \left (d x + c\right )^{2} + 2 \, {\left (5 \, A + 3 \, B\right )} a^{3}\right )} \sin \left (d x + c\right )}{20 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 151 vs.
\(2 (41) = 82\).
time = 0.28, size = 151, normalized size = 2.96 \begin {gather*} \begin {cases} \frac {A a^{3} \sin ^{4}{\left (c + d x \right )}}{4 d} + \frac {A a^{3} \sin ^{3}{\left (c + d x \right )}}{d} + \frac {3 A a^{3} \sin ^{2}{\left (c + d x \right )}}{2 d} + \frac {A a^{3} \sin {\left (c + d x \right )}}{d} + \frac {B a^{3} \sin ^{5}{\left (c + d x \right )}}{5 d} + \frac {3 B a^{3} \sin ^{4}{\left (c + d x \right )}}{4 d} + \frac {B a^{3} \sin ^{3}{\left (c + d x \right )}}{d} + \frac {B a^{3} \sin ^{2}{\left (c + d x \right )}}{2 d} & \text {for}\: d \neq 0 \\x \left (A + B \sin {\left (c \right )}\right ) \left (a \sin {\left (c \right )} + a\right )^{3} \cos {\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 116 vs.
\(2 (47) = 94\).
time = 0.49, size = 116, normalized size = 2.27 \begin {gather*} \frac {4 \, B a^{3} \sin \left (d x + c\right )^{5} + 5 \, A a^{3} \sin \left (d x + c\right )^{4} + 15 \, B a^{3} \sin \left (d x + c\right )^{4} + 20 \, A a^{3} \sin \left (d x + c\right )^{3} + 20 \, B a^{3} \sin \left (d x + c\right )^{3} + 30 \, A a^{3} \sin \left (d x + c\right )^{2} + 10 \, B a^{3} \sin \left (d x + c\right )^{2} + 20 \, A a^{3} \sin \left (d x + c\right )}{20 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.07, size = 81, normalized size = 1.59 \begin {gather*} \frac {\frac {a^3\,{\sin \left (c+d\,x\right )}^2\,\left (3\,A+B\right )}{2}+\frac {a^3\,{\sin \left (c+d\,x\right )}^4\,\left (A+3\,B\right )}{4}+\frac {B\,a^3\,{\sin \left (c+d\,x\right )}^5}{5}+A\,a^3\,\sin \left (c+d\,x\right )+a^3\,{\sin \left (c+d\,x\right )}^3\,\left (A+B\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________